using UnityEngine;
using System.Collections;

public class BossRibs : Animatable {

    public GameObject manager;
    private bool animationStarted;

	// Use this for initialization
	void Start () {

        InitializeAnimationList();
        AddAnimation("rise", 0, 0, 17, .1f);
        renderer.enabled = false;
	}

    protected override void Update()
    {
        if (!animationStarted)
        {
            GameManager man = manager.GetComponent<GameManager>();
            renderer.enabled = true;
            if (man.GetStageNum() == (man.GetNumStages() - 1))
            {
                SoundEffects.instance.playRibsRise();
                StartAnimation("rise", false);
                animationStarted = true;
            }
        }
        base.Update();
    }
	
}
